home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / programming / assembly / play503.s.lha / P50A / 503.1.G next >
Encoding:
Text File  |  1993-05-20  |  31.8 KB  |  2,150 lines

  1. ;Player-testcode
  2.  
  3. ;start = 10    ;Starting position
  4.  
  5. fade  = 0    ;0 = normal
  6.         ;1 = use master volume
  7.  
  8. CIA = 1        ;0 = disabled
  9.         ;1 = enabled
  10.  
  11. system = 1    ;0 = killer
  12.         ;1 = friendly
  13.  
  14. channels = 4    ;amount of channels to be played
  15.  
  16. use = -1     ;The Usecode
  17.  
  18.  
  19.     include Player.i
  20.  
  21.     section    Player5.0A,code
  22.  
  23.     movem.l    d0-a6,-(sp)
  24.     lea    $dff000,a6
  25.     ifeq    system
  26.     move    $1c(a6),-(sp)
  27.     move    #$7fff,$9a(a6)
  28.     move    #$e000,$9a(a6)
  29.     move    2(a6),-(sp)
  30.     move    #$7ff,$96(a6)
  31.     endc
  32.  
  33.     lea    P50_data,a0
  34.     sub.l    a1,a1
  35.     moveq    #0,d0        ;Auto Detect
  36.     bsr    P50_motuuli+P50_InitOffset
  37.     tst    d0
  38.     bne    P50_exit
  39.  
  40. P50_sync
  41.     ifeq    CIA
  42.     move.l    4(a6),d0
  43.     andi.l    #$1ff00,d0
  44.     cmp.l    #$8100,d0
  45.     bne.b    P50_sync
  46.  
  47. P50_sync2
  48.     move.l    4(a6),d0
  49.     andi.l    #$1ff00,d0
  50.     cmp.l    #$8200,d0
  51.     bne.b    P50_sync2
  52.  
  53.     move    #$fff,$180(a6)
  54.     bsr    P50_motuuli+P50_MusicOffset
  55.     clr    $180(a6)
  56.  
  57.     moveq    #0,d0
  58.     move    6(a6),d0
  59.     sub.l    #$8200,d0
  60.     cmp.l    P50_raster(pc),d0
  61.     ble.b    P50_kosj
  62.     move    d0,P50_raster+2
  63. P50_kosj
  64.     tst    P50_raster2+2
  65.     bne.b    P50_doing
  66.     move    d0,P50_raster2+2
  67.     bra.b    P50_doneg
  68. P50_doing
  69.     add.l    P50_raster2(pc),d0
  70.     asr.l    #1,d0
  71.     move.l    d0,P50_raster2
  72. P50_doneg
  73.     addq.l    #1,P50_frames
  74.  
  75.     ifne    fade
  76.     btst    #10,$16(a6)
  77.     bne.b    P50_jid
  78.     move    P50_diri(pc),d0
  79.     sub    d0,P50_motuuli+P50_MasterVolume
  80.     bne.b    P50_judo
  81.     neg    P50_diri
  82.     bra.b    P50_jid
  83. P50_judo
  84.     cmp    #64,P50_motuuli+P50_MasterVolume
  85.     bne.b    P50_jid
  86.     neg    P50_diri
  87.     endc
  88.  
  89. P50_jid
  90.     endc
  91.  
  92.     btst    #6,$bfe001
  93.     bne    P50_sync
  94.  
  95. P50_exit
  96.     bsr    P50_motuuli+P50_EndOffset
  97.  
  98.     ifeq    system
  99.     move    (sp)+,d7
  100.     bset    #15,d7
  101.     move    #$7ff,$96(a6)
  102.     move    d7,$96(a6)
  103.  
  104.     move    (sp)+,d7
  105.     bset    #15,d7
  106.     move    #$7fff,$9a(a6)
  107.     move    d7,$9a(a6)
  108.     endc
  109.     movem.l    (sp)+,d0-a6
  110.  
  111.     movem.l    P50_raster(pc),d0-d2
  112.     move.l    P50_positionbase(pc),a0
  113.     move.l    P50_patternbase(pc),a1
  114.     move.l    P50_spos(pc),a2
  115.     rts
  116.  
  117. P50_IRQsave    dc    0
  118. P50_DMAsave    dc    0
  119. P50_raster    dc.l    0
  120. P50_raster2    dc.l    0
  121. P50_frames    dc.l    0
  122. P50_diri    dc    1
  123.  
  124. *********************************
  125. *        Player v5.0A ®        *
  126. *      All in one-version    *
  127. *     MC68000/68010-version    *
  128. *        Version 503.1        *
  129. *    © 1992 Jarno Paananen    *
  130. *     All rights reserved    *
  131. *********************************
  132.  
  133.  
  134. ******** START OF BINARY FILE **************
  135.  
  136. P50_motuuli
  137.     bra    P50_Init
  138.     ifeq    CIA
  139.     bra    P50_Music
  140.     else
  141.     rts
  142.     rts
  143.     endc
  144.     bra    P50_End
  145.     rts                ;no P50_SetRepeat
  146.     rts
  147.  
  148. P50_master    dc    64        ;Master volume (0-64)
  149. P50_Tempo    dc    1        ;Use tempo? 0=no,non 0=yes
  150. P50_play    dc    1        ;Stop flag (0=stop)
  151.  
  152. P50_Temp0Offset
  153.     dc.l    P50_temp0-P50_motuuli
  154. P50_Temp1Offset
  155.     dc.l    P50_temp1-P50_motuuli
  156. P50_Temp2Offset
  157.     dc.l    P50_temp2-P50_motuuli
  158. P50_Temp3Offset
  159.     dc.l    P50_temp3-P50_motuuli
  160.  
  161. P50_getnote    macro
  162.     moveq    #$7e,d0
  163.     and.b    (a5),d0
  164.     beq.b    .nonote\@
  165.     ifne    P50_vib
  166.     clr.b    P50_VibPos(a5)
  167.     endc
  168.  
  169.     ifne    P50_ft
  170.     add    P50_Fine(a5),d0
  171.     endc
  172.     move    d0,P50_Note(a5)
  173.     move    (a2,d0),P50_Period(a5)
  174.  
  175. .nonote\@
  176.     endm
  177.  
  178.     ifne    CIA
  179.  
  180.     ifeq    system
  181. P50_intti
  182.     movem.l    d0-a6,-(sp)
  183.     tst.b    $bfdd00
  184.     move.b    #$7e,$bfdd00
  185.  
  186.     lea    $dff000,a6
  187. ;    move    #$fff,$180(a6)
  188.     bsr    P50_Music
  189. ;    move    #0,$180(a6)
  190.     move    #$2000,$9c(a6)
  191.     movem.l    (sp)+,d0-a6
  192.     rte
  193.  
  194.     else
  195. P50_lev6server
  196.     movem.l    d2-d7/a2-a6,-(sp)
  197.     lea    $dff000,a6
  198.     lea    P50_cn(pc),a3
  199.     move    P50_server(pc),d0
  200.     bne.b    P50_eieka
  201.     pea    P50_ohi(pc)
  202.     bra    P50_Music
  203. P50_eieka
  204.     subq    #1,d0
  205.     beq    P50_dmason
  206.     bra    P50_setrepeat
  207. P50_ohi    movem.l    (sp)+,d2-d7/a2-a6
  208.     moveq    #1,d0
  209.     rts
  210.     endc
  211.     endc
  212.  
  213. ;­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
  214. ;­ Call P50_Init to initialize the playroutine    ­
  215. ;­ D0 --> Timer detection (for CIA-version)    ­
  216. ;­ A0 --> Address to the module            ­
  217. ;­ A1 --> Address to samples/0            ­
  218. ;­ A6 --> Customchip baseaddress ($DFF000)    ­
  219. ;­ D0 <-- 0 if succeeded            ­
  220. ;­         Uses A0-A5/D0-D6        ­
  221. ;­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
  222.  
  223.  
  224. P50_Init
  225.     cmp.l    #"P50A",(a0)+
  226.     beq.b    .modok
  227.     subq.l    #4,a0
  228.  
  229. .modok    basereg    P50_cn,a3
  230.     lea    P50_cn(pc),a3
  231.  
  232.     ifne    CIA
  233.     move    d0,-(sp)
  234.     endc
  235.  
  236.     move.l    a1,d0
  237.     bne.b    .redirect
  238.  
  239.     moveq    #0,d0
  240.     move    (a0),d0
  241.     lea    (a0,d0.l),a1
  242. .redirect
  243.     lea    4(a0),a2
  244.     lea    P50_Samples(pc),a4
  245.     moveq    #0,d1
  246.     move.b    3(a0),d1
  247.     subq    #1,d1
  248.     moveq    #0,d4
  249. P50_lopos
  250.     move.l    a1,(a4)+
  251.     move    (a2)+,d4
  252.     bpl.b    P50_kook
  253.     neg    d4
  254.     asl    #4,d4
  255.     lea    P50_Samples-16(pc),a5
  256.     move.l    (a5,d4),d6
  257.     move.l    d6,-4(a4)
  258.     move    4(a5,d4),d4
  259.     sub.l    d4,a1
  260.     sub.l    d4,a1
  261.     bra.b    P50_jatk
  262.  
  263. P50_kook
  264.     move.l    a1,d6
  265. P50_jatk
  266.     move    d4,(a4)+
  267.     moveq    #0,d2
  268.     move.b    (a2)+,d2
  269.     moveq    #0,d3
  270.     move.b    (a2)+,d3
  271.     moveq    #0,d0
  272.     move    (a2)+,d0
  273.     bmi.b    .norepeat
  274.  
  275.     move    d4,d5
  276.     sub    d0,d5
  277.     add.l    d0,d0
  278.     move.l    d6,a5
  279.     lea    (a5,d0.l),a5
  280.     move.l    a5,(a4)+
  281.     move    d5,(a4)+
  282.     bra.b    P50_gene
  283. .norepeat
  284.     move.l    d6,(a4)+
  285.     move    #1,(a4)+
  286. P50_gene
  287.     move    d3,(a4)+
  288.     mulu    #74,d2
  289.     move    d2,(a4)+
  290.     add.l    d4,a1
  291.     add.l    d4,a1
  292.     dbf    d1,P50_lopos
  293.  
  294.     lea    P50_temp0(pc),a1
  295.     lea    P50_temp1(pc),a2
  296.     lea    P50_temp2(pc),a4
  297.     lea    P50_temp3(pc),a5
  298.     moveq    #Channel_Block_SIZE/2-2,d0
  299.     moveq    #0,d1
  300. .cl    move    d1,(a1)+
  301.     move    d1,(a2)+
  302.     move    d1,(a4)+
  303.     move    d1,(a5)+
  304.     dbf    d0,.cl
  305.  
  306.     moveq    #0,d0
  307.     move.b    3(a0),d0
  308.     mulu    #6,d0
  309.     lea    4(a0,d0.l),a1
  310.     move.l    a1,P50_positionbase(a3)
  311.  
  312.     move.b    2(a0),d1
  313.     lsl    #3,d1
  314.     lea    (a1,d1.l),a4
  315.     move.l    a4,P50_possibase(a3)
  316.  
  317.     move.l    a4,a2
  318.     moveq    #-1,d0
  319. .search    cmp.b    (a2)+,d0
  320.     bne.b    .search
  321.     move.l    a2,P50_patternbase(a3)    
  322.  
  323.     ifd    start
  324.     lea    start(a4),a4
  325.     endc
  326.  
  327.     moveq    #0,d0
  328.     move.b    (a4)+,d0
  329.     move.l    a4,P50_spos(a3)
  330.     lsl    #2,d0
  331.     add.l    d0,a1
  332.  
  333.     move.l    a2,a4
  334.     moveq    #0,d0    
  335.     move    (a1)+,d0
  336.     lea    (a4,d0.l),a2
  337.     move.l    a2,P50_ChaPos+P50_temp0(a3)
  338.     move    (a1)+,d0
  339.     lea    (a4,d0.l),a2
  340.     move.l    a2,P50_ChaPos+P50_temp1(a3)
  341.     move    (a1)+,d0
  342.     lea    (a4,d0.l),a2
  343.     move.l    a2,P50_ChaPos+P50_temp2(a3)
  344.     move    (a1)+,d0
  345.     lea    (a4,d0.l),a2
  346.     move.l    a2,P50_ChaPos+P50_temp3(a3)
  347.  
  348.     lea    P50_setrepeat(pc),a0
  349.     move.l    a0,P50_intaddr(a3)
  350.  
  351.     move    #63,P50_rowpos(a3)
  352.     move    #6,P50_speed(a3)
  353.     move    #5,P50_speed2(a3)
  354.     clr    P50_speedis1(a3)
  355.  
  356.     ifne    P50_pl
  357.     clr    P50_plflag(a3)
  358.     clr    P50_plcount(a3)
  359.     endc
  360.  
  361.     ifne    P50_pde
  362.     clr    P50_pdelay(a3)
  363.     endc
  364.     clr    (a3)
  365.  
  366.     bset    #1,$bfe001
  367.  
  368.     ifeq    system
  369.     move.l    4.w,a6
  370.     moveq    #0,d0
  371.     btst    d0,297(a6)
  372.     beq.b    .no68010
  373.  
  374.     lea    P50_liko(pc),a5
  375.     jsr    -$1e(a6)
  376.  
  377. .no68010
  378.     move.l    d0,P50_vektori(a3)
  379.     move.l    d0,a0
  380.     move.l    $78(a0),P50_oldlev6(a3)
  381.     endc
  382.  
  383.     moveq    #0,d0
  384.     lea    $dff000,a6
  385.     move    d0,$a8(a6)
  386.     move    d0,$b8(a6)
  387.     move    d0,$c8(a6)
  388.     move    d0,$d8(a6)
  389.     move    #$f,$96(a6)
  390.  
  391.     ifeq    system
  392.     move    #$2000,$9a(a6)
  393.     lea    $bfd000,a0
  394.     move.b    #$7f,$d00(a0)
  395.     move.b    #8,$e00(a0)
  396.     endc
  397.  
  398.     ifeq    CIA
  399.     move.b    #$4a,$400(a0)
  400.     move.b    #1,$500(a0)
  401. .wati
  402.     btst    d0,$d00(a0)
  403.     beq.b    .wati
  404.     move.b    #$81,$d00(a0)
  405.     move    #$e000,$9a(a6)
  406.     endc
  407.  
  408.     ifne    CIA
  409.     move    (sp)+,d0
  410.     subq    #1,d0
  411.     beq.b    P50_ForcePAL
  412.     subq    #1,d0
  413.     beq.b    P50_NTSC
  414.     move.l    4.w,a1
  415.     cmp.b    #60,$212(a1)    ;VBlankFrequency
  416.     beq.b    P50_NTSC
  417. P50_ForcePAL
  418.     move.l    #1773447,d0    ;PAL
  419.     bra.b    P50_setcia
  420. P50_NTSC
  421.     move.l    #1789773,d0    ;NTSC
  422. P50_setcia
  423.     move.l    d0,P50_timer(a3)
  424.     divu    #125,d0
  425.     move    d0,P50_thi2(a3)
  426.     sub    #$1c8*2,d0
  427.     move    d0,P50_thi(a3)
  428.  
  429.     ifeq    system
  430.     move.b    d0,$400(a0)
  431.     lsr    #8,d0
  432.     move.b    d0,$500(a0)
  433.  
  434.     lea    P50_intti(pc),a1
  435.     move.l    a1,P50_tintti(a3)
  436.     move.l    P50_vektori(pc),a2
  437.     move.l    a1,$78(a2)
  438.  
  439.     move.b    #$81,$d00(a0)
  440.     move.b    #$19,$e00(a0)
  441.     moveq    #0,d0
  442.     endc
  443.     endc
  444.  
  445.     ifeq    system
  446.     move    #$e000,$9a(a6)
  447.     rts
  448.  
  449. P50_liko
  450.     dc.l    $4E7A0801        ;MOVEC    VBR,d0
  451.     rte
  452.     endc
  453.  
  454.     ifne    system
  455.     move.l    4.w,a6
  456.     moveq    #-1,d0
  457.     jsr    -$14a(a6)
  458.     move.b    d0,P50_sigbit(a3)
  459.     bmi    P50_err
  460.  
  461.     lea    P50_allocport(pc),a1
  462.     move.l    a1,P50_portti(a3)
  463.     move.b    d0,15(a1)
  464.     move.l    a1,-(sp)
  465.     suba.l    a1,a1
  466.     jsr    -$126(a6)
  467.     move.l    (sp)+,a1
  468.     move.l    d0,16(a1)
  469.     lea    P50_reqlist(pc),a0
  470.     move.l    a0,(a0)
  471.     addq.l    #4,(a0)
  472.     clr.l    4(a0)
  473.     move.l    a0,8(a0)
  474.  
  475.     lea    P50_dat(pc),a1
  476.     move.l    a1,P50_reqdata(a3)
  477.     lea    P50_allocreq(pc),a1
  478.     lea    P50_audiodev(pc),a0
  479.     moveq    #0,d0
  480.     moveq    #0,d1
  481.     move.l    4.w,a6
  482.     jsr    -$1bc(a6)
  483.     tst.b    d0
  484.     bne    P50_err
  485.     st.b    P50_audioopen(a3)
  486.  
  487.     lea    P50_timerint(pc),a1
  488.     move.l    a1,P50_timerdata(a3)
  489.     lea    P50_lev6server(pc),a1
  490.     move.l    a1,P50_timerdata+8(a3)
  491.  
  492.     moveq    #8,d3
  493.     lea    P50_cianame(pc),a1
  494.     move.b    #'b',3(a1)
  495. P50_openciares
  496.     moveq    #0,d0
  497.     jsr    -$1f2(a6)
  498.     move.l    d0,P50_ciares(a3)
  499.     beq.b    P50_tryCIAA
  500.     move.l    d0,a6
  501.     lea    P50_timerinterrupt(pc),a1
  502.     moveq    #0,d0
  503.     jsr    -6(a6)
  504.     tst.l    d0
  505.     beq.b    P50_gottimer
  506.     addq.l    #4,d3
  507.     lea    P50_timerinterrupt(pc),a1
  508.     moveq    #1,d0
  509.     jsr    -6(a6)
  510.     tst.l    d0
  511.     beq.b    P50_gottimer
  512. P50_tryCIAA
  513.     lea    P50_cianame(pc),a1
  514.     cmp.b    #'b',3(a1)
  515.     bne.b    P50_err
  516.     subq.b    #1,3(a1)
  517.     moveq    #0,d3
  518.     bra    P50_openciares
  519.  
  520. P50_gottimer
  521.     lea    P50_craddr+8(pc),a6
  522.     move.l    P50_ciaaddr(pc,d3),d0
  523.     move.l    d0,(a6)
  524.     sub    #$100,d0
  525.     move.l    d0,-(a6)
  526.     moveq    #2,d3
  527.     btst    #9,d0
  528.     bne.b    P50_timerB
  529.     subq.b    #1,d3
  530.     add    #$100,d0
  531. P50_timerB
  532.     add    #$900,d0
  533.     move.l    d0,-(a6)
  534.     move.l    d0,a0
  535.     and.b    #%10000000,(a0)
  536.     move.b    d3,P50_timeropen(a3)
  537.     moveq    #0,d0
  538.  
  539.     move.l    P50_craddr+4(pc),a1
  540.     move.b    P50_tlo(pc),(a1)
  541.     move.b    P50_thi(pc),$100(a1)
  542.     or.b    #$19,(a0)
  543.     rts
  544.  
  545. P50_err    moveq    #-1,d0
  546.     rts
  547.  
  548. P50_ciaaddr
  549.     dc.l    $bfe501,$bfe701,$bfd500,$bfd700
  550.     endc
  551.  
  552. ;­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
  553. ;­         Call P50_End to stop the music        ­
  554. ;­   A6 --> Customchip baseaddress ($DFF000)    ­
  555. ;­          Uses D0/A0            ­
  556. ;­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
  557.     
  558. P50_End    moveq    #0,d0
  559.     move    d0,$a8(a6)
  560.     move    d0,$b8(a6)
  561.     move    d0,$c8(a6)
  562.     move    d0,$d8(a6)
  563.     bclr    #1,$bfe001
  564.     move    #$f,$96(a6)
  565.  
  566.     ifeq    system
  567.     move    #$2000,$9a(a6)
  568.     move.l    P50_vektori(pc),a0
  569.     move.l    P50_oldlev6(pc),$78(a0)
  570.  
  571.     else
  572.     lea    P50_cn(pc),a3
  573.     moveq    #0,d0
  574.     move.b    P50_timeropen(pc),d0
  575.     beq.b    P50_rem1
  576.     move.l    P50_ciares(pc),a6
  577.     lea    P50_timerinterrupt(pc),a1
  578.     subq.b    #1,d0
  579.     jsr    -$c(a6)
  580. P50_rem1
  581.     move.l    4.w,a6
  582.     tst.b    P50_audioopen(a3)
  583.     beq.b    P50_rem2
  584.     lea    P50_allocreq(a3),a1
  585.     jsr    -$1c2(a6)
  586.     clr.b    P50_audioopen(a3)
  587. P50_rem2
  588.     moveq    #0,d0
  589.     move.b    P50_sigbit(pc),d0
  590.     bmi.b    P50_rem3
  591.     jsr    -$150(a6)
  592.     st    P50_sigbit(a3)
  593. P50_rem3
  594.     endc
  595.     rts
  596.  
  597.     ifne    fade
  598. P50_mfade
  599.     move    P50_master(pc),d0
  600.     move    P50_temp0+P50_Shadow(pc),d1
  601.     mulu    d0,d1
  602.     lsr    #6,d1
  603.     move    d1,$a8(a6)
  604.  
  605.     ifgt    channels-1
  606.     move    P50_temp1+P50_Shadow(pc),d1
  607.     mulu    d0,d1
  608.     lsr    #6,d1
  609.     move    d1,$b8(a6)
  610.     endc
  611.  
  612.     ifgt    channels-2
  613.     move    P50_temp2+P50_Shadow(pc),d1
  614.     mulu    d0,d1
  615.     lsr    #6,d1
  616.     move    d1,$c8(a6)
  617.     endc
  618.  
  619.     ifgt    channels-3
  620.     move    P50_temp3+P50_Shadow(pc),d1
  621.     mulu    d0,d1
  622.     lsr    #6,d1
  623.     move    d1,$d8(a6)
  624.     endc
  625.     rts
  626.     endc
  627.     
  628. ;­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
  629. ;­ Call P50_Music every frame to play the music    ­
  630. ;­ A6 --> Customchip baseaddress ($DFF000)    ­
  631. ;­              Uses A0-A5/D0-D7        ­
  632. ;­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
  633.  
  634. P50_Music
  635.     lea    P50_cn(pc),a3
  636.  
  637.     tst    P50_play(a3)
  638.     bne.b    P50_ohitaaa
  639.     ifne    CIA
  640.     ifeq    system
  641.     move.l    P50_vektori(pc),a5
  642.     move.l    P50_tintti(pc),$78(a5)
  643.     move.b    P50_tlo2(pc),$bfd400
  644.     move.b    P50_thi2(pc),$bfd500
  645.  
  646.     else
  647.     clr    P50_server(a3)
  648.     move.l    P50_craddr+4(pc),a0
  649.     move.b    P50_tlo2(pc),(a0)
  650.     move.b    P50_thi2(pc),$100(a0)
  651.     endc
  652.     endc
  653.     rts
  654.  
  655. P50_ohitaaa
  656.     ifne    fade
  657.     pea    P50_mfade(pc)
  658.     endc
  659.  
  660.     moveq    #Channel_Block_SIZE,d6
  661.     moveq    #16,d7
  662.  
  663.     move    (a3),d4
  664.     addq    #1,d4
  665.     cmp    P50_speed(pc),d4
  666.     beq    P50_playtime
  667.  
  668.     move    d4,(a3)
  669.  
  670. P50_delay
  671.     ifne    CIA
  672.     ifeq    system
  673.     move.l    P50_vektori(pc),a5
  674.     move.l    P50_tintti(pc),$78(a5)
  675.     move.b    P50_tlo2(pc),$bfd400
  676.     move.b    P50_thi2(pc),$bfd500
  677.  
  678.     else
  679.     clr    P50_server(a3)
  680.     move.l    P50_craddr+4(pc),a0
  681.     move.b    P50_tlo2(pc),(a0)
  682.     move.b    P50_thi2(pc),$100(a0)
  683.     endc
  684.     endc
  685.  
  686.     lea    P50_temp0(pc),a5
  687.     lea    $a0(a6),a4
  688.  
  689.     moveq    #channels-1,d5
  690. P50_lopas
  691.     tst    P50_OnOff(a5)
  692.     beq    P50_contfxdone
  693.     moveq    #$f,d0
  694.     and    (a5),d0
  695.     add    d0,d0
  696.     move    P50_jtab2(pc,d0),d0
  697.     jmp    P50_jtab2(pc,d0)
  698.  
  699. P50_jtab2
  700.     dc    P50_contfxdone-P50_jtab2
  701.  
  702.     ifne    P50_pu
  703.     dc    P50_portup-P50_jtab2
  704.     else
  705.     dc    P50_contfxdone-P50_jtab2
  706.     endc
  707.  
  708.     ifne    P50_pd
  709.     dc    P50_portdwn-P50_jtab2
  710.     else
  711.     dc    P50_contfxdone-P50_jtab2
  712.     endc
  713.  
  714.     ifne    P50_tp
  715.     dc    P50_toneport-P50_jtab2
  716.     else
  717.     dc    P50_contfxdone-P50_jtab2
  718.     endc
  719.  
  720.     ifne    P50_vib
  721.     dc    P50_vib2-P50_jtab2
  722.     else
  723.     dc    P50_contfxdone-P50_jtab2
  724.     endc
  725.  
  726.     ifne    P50_tpvs
  727.     dc    P50_tpochvslide-P50_jtab2
  728.     else
  729.     dc    P50_contfxdone-P50_jtab2
  730.     endc
  731.  
  732.     ifne    P50_vbvs
  733.     dc    P50_vibochvslide-P50_jtab2
  734.     else
  735.     dc    P50_contfxdone-P50_jtab2
  736.     endc
  737.  
  738.     ifne    P50_tre
  739.     dc    P50_tremo-P50_jtab2
  740.     else
  741.     dc    P50_contfxdone-P50_jtab2
  742.     endc
  743.  
  744.     ifne    P50_arp
  745.     dc    P50_arpeggio-P50_jtab2
  746.     else
  747.     dc    P50_contfxdone-P50_jtab2
  748.     endc
  749.  
  750.     dc    P50_contfxdone-P50_jtab2
  751.  
  752.     ifne    P50_vs
  753.     dc    P50_volslide-P50_jtab2
  754.     else
  755.     dc    P50_contfxdone-P50_jtab2
  756.     endc
  757.  
  758.     dc    P50_contfxdone-P50_jtab2
  759.     dc    P50_contfxdone-P50_jtab2
  760.     dc    P50_contfxdone-P50_jtab2
  761.  
  762.     ifne    P50_ec
  763.     dc    P50_contecommands-P50_jtab2
  764.     else
  765.     dc    P50_contfxdone-P50_jtab2
  766.     endc
  767.     dc    P50_contfxdone-P50_jtab2
  768.  
  769.     ifne    P50_ec
  770. P50_contecommands
  771.     move.b    P50_Info(a5),d0
  772.     and.b    #$f0,d0
  773.     lsr    #3,d0
  774.     move    P50_etab2(pc,d0),d0
  775.     jmp    P50_etab2(pc,d0)
  776.  
  777. P50_etab2
  778.     dc    P50_contfxdone-P50_etab2
  779.  
  780.     ifne    P50_fsu
  781.     dc    P50_fineup2-P50_etab2
  782.     else
  783.     dc    P50_contfxdone-P50_etab2
  784.     endc
  785.  
  786.     ifne    P50_fsd
  787.     dc    P50_finedwn2-P50_etab2
  788.     else
  789.     dc    P50_contfxdone-P50_etab2
  790.     endc
  791.  
  792.     dc    P50_contfxdone-P50_etab2
  793.     dc    P50_contfxdone-P50_etab2
  794.  
  795.     dc    P50_contfxdone-P50_etab2
  796.     dc    P50_contfxdone-P50_etab2
  797.  
  798.     dc    P50_contfxdone-P50_etab2
  799.     dc    P50_contfxdone-P50_etab2
  800.  
  801.     ifne    P50_rt
  802.     dc    P50_retrig-P50_etab2
  803.     else
  804.     dc    P50_contfxdone-P50_etab2
  805.     endc
  806.  
  807.     ifne    P50_fvu
  808.     dc    P50_finevup2-P50_etab2
  809.     else
  810.     dc    P50_contfxdone-P50_etab2
  811.     endc
  812.  
  813.     ifne    P50_fvd
  814.     dc    P50_finevdwn2-P50_etab2
  815.     else
  816.     dc    P50_contfxdone-P50_etab2
  817.     endc
  818.  
  819.     dc    P50_notecut-P50_etab2
  820.  
  821.     ifne    P50_nd
  822.     dc    P50_notedelay-P50_etab2
  823.     else
  824.     dc    P50_contfxdone-P50_etab2
  825.     endc
  826.  
  827.     dc    P50_contfxdone-P50_etab2
  828.     dc    P50_contfxdone-P50_etab2
  829.     endc
  830.  
  831.     ifne    P50_fsu
  832. P50_fineup2
  833.     tst    (a3)
  834.     bne    P50_contfxdone
  835.     moveq    #$f,d0
  836.     and.b    P50_Info(a5),d0
  837.     sub    d0,P50_Period(a5)
  838.     moveq    #113,d0
  839.     cmp    P50_Period(a5),d0
  840.     ble    .jup
  841.     move    d0,P50_Period(a5)
  842. .jup    move    P50_Period(a5),6(a4)
  843.     bra    P50_contfxdone
  844.     endc
  845.  
  846.     ifne    P50_fsd
  847. P50_finedwn2
  848.     tst    (a3)
  849.     bne    P50_contfxdone
  850.     moveq    #$f,d0
  851.     and.b    P50_Info(a5),d0
  852.     add    d0,P50_Period(a5)
  853.     cmp    #856,P50_Period(a5)
  854.     ble    .jup
  855.     move    #856,P50_Period(a5)
  856. .jup    move    P50_Period(a5),6(a4)
  857.     bra    P50_contfxdone
  858.     endc
  859.  
  860.     ifne    P50_fvu
  861. P50_finevup2
  862.     tst    (a3)
  863.     bne    P50_contfxdone
  864.     moveq    #$f,d0
  865.     and.b    P50_Info(a5),d0
  866.     add    d0,P50_Volume(a5)
  867.     moveq    #64,d0
  868.     cmp    P50_Volume(a5),d0
  869.     bge.b    .jup
  870.     move    d0,P50_Volume(a5)
  871. .jup    move    P50_Volume(a5),8(a4)
  872.     bra    P50_contfxdone
  873.     endc
  874.  
  875.     ifne    P50_fvd
  876. P50_finevdwn2
  877.     tst    (a3)
  878.     bne    P50_contfxdone
  879.     moveq    #$f,d0
  880.     and.b    P50_Info(a5),d0
  881.     sub    d0,P50_Volume(a5)
  882.     bpl.b    .jup
  883.     clr    P50_Volume(a5)
  884. .jup    move    P50_Volume(a5),8(a4)
  885.     bra    P50_contfxdone
  886.     endc
  887.  
  888.     ifne    P50_nc
  889. P50_notecut
  890.     moveq    #$f,d0
  891.     and.b    P50_Info(a5),d0
  892.     cmp    (a3),d0
  893.     bne    P50_contfxdone
  894.     ifeq    fade
  895.     clr    8(a4)
  896.     else
  897.     clr    P50_Shadow(a5)
  898.     endc
  899.     clr    P50_Volume(a5)
  900.     bra    P50_contfxdone
  901.     endc
  902.  
  903.     ifne    P50_nd
  904. P50_notedelay
  905.     moveq    #$f,d0
  906.     and.b    P50_Info(a5),d0
  907.     cmp    (a3),d0
  908.     bne    P50_contfxdone
  909.  
  910.     moveq    #$7e,d0
  911.     and.b    (a5),d0
  912.     beq    P50_contfxdone
  913.     move    P50_DMABit(a5),d0
  914.     move    d0,$96(a6)
  915.     or    d0,P50_dma(a3)
  916.     move.l    P50_Sample(a5),a1
  917.     move.l    (a1)+,(a4)+
  918.     move    (a1),(a4)+
  919.     move    P50_Period(a5),(a4)
  920.     subq.l    #6,a4
  921.     ifeq    system
  922.     lea    P50_dmason(pc),a1
  923.     move.l    a1,d0
  924.     move.l    P50_vektori(pc),a1
  925.     move.l    d0,$78(a1)
  926.     endc
  927.  
  928.     ifeq    CIA
  929.     move.b    #$19,$bfde00
  930.     else
  931.     ifeq    system
  932.     move.b    #$4a,$bfd400
  933.     move.b    #1,$bfd500
  934.     else
  935.     move    #1,P50_server(a3)
  936.     move.l    P50_craddr+4(pc),a1
  937.     move.b    #$4a,(a1)
  938.     move.b    #1,$100(a1)
  939.     endc
  940.     endc
  941.  
  942.     bra    P50_contfxdone
  943.     endc
  944.  
  945.     ifne    P50_rt
  946. P50_retrig
  947.     subq    #1,P50_RetrigCount(a5)
  948.     bne    P50_contfxdone
  949.     move    P50_DMABit(a5),d0
  950.     move    d0,$96(a6)
  951.     or    d0,P50_dma(a3)
  952.     move.l    P50_Sample(a5),a1
  953.     move.l    (a1)+,(a4)
  954.     move    (a1),4(a4)
  955.  
  956.     ifeq    system
  957.     lea    P50_dmason(pc),a1
  958.     move.l    a1,d0
  959.     move.l    P50_vektori(pc),a1
  960.     move.l    d0,$78(a1)
  961.     endc
  962.  
  963.     ifeq    CIA
  964.     move.b    #$19,$bfde00
  965.     else
  966.     ifeq    system
  967.     move.b    #$4a,$bfd400
  968.     move.b    #1,$bfd500
  969.     else
  970.     move    #1,P50_server(a3)
  971.     move.l    P50_craddr+4(pc),a1
  972.     move.b    #$4a,(a1)
  973.     move.b    #1,$100(a1)
  974.     endc
  975.     endc
  976.  
  977.     moveq    #$f,d0
  978.     and.b    P50_Info(a5),d0
  979.     move    d0,P50_RetrigCount(a5)
  980.     bra    P50_contfxdone
  981.     endc
  982.  
  983.     ifne    P50_arp
  984. P50_arplist
  985.     dc.b 0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1
  986.  
  987. P50_arpeggio
  988.     move    (a3),d0
  989.     move.b    P50_arplist(pc,d0),d0
  990.     beq.b    .arp0
  991.     ror.b    #1,d0
  992.     bcc.b    P50_arp1
  993.     moveq    #$f,d0
  994.     and.b    P50_Info(a5),d0
  995.     bra.b    P50_arp3
  996. .arp0
  997.     move    P50_Note(a5),d0
  998.     move    P50_periods(pc,d0),6(a4)
  999.     bra    P50_contfxdone
  1000. P50_arp1
  1001.     move.b    P50_Info(a5),d0
  1002.     lsr    #4,d0
  1003. P50_arp3
  1004.     add    d0,d0
  1005.     add    P50_Note(a5),d0
  1006.     move    P50_periods(pc,d0),6(a4)
  1007.     bra    P50_contfxdone
  1008.     endc
  1009.  
  1010. P50_periods
  1011.     ifne    P50_ft
  1012.     incbin    periodtable
  1013.     else
  1014.     incbin    periods.nft
  1015.     endc
  1016.  
  1017.     ifne    P50_vs
  1018. P50_volslide
  1019.     move.b    P50_Info(a5),d0
  1020.     sub.b    d0,P50_Volume+1(a5)
  1021.     bpl.b    .test
  1022.     clr    P50_Volume(a5)
  1023.     ifeq    fade
  1024.     clr    8(a4)
  1025.     else
  1026.     clr    P50_Shadow(a5)
  1027.     endc
  1028.     bra    P50_contfxdone
  1029. .test    moveq    #64,d0
  1030.     cmp    P50_Volume(a5),d0
  1031.     bge.b    .ncs
  1032.     move    d0,P50_Volume(a5)
  1033.     ifeq    fade
  1034.     move    d0,8(a4)
  1035.     else
  1036.     move    d0,P50_Shadow(a5)
  1037.     endc
  1038.     bra.b    P50_contfxdone
  1039. .ncs    ifeq    fade
  1040.     move    P50_Volume(a5),8(a4)
  1041.     else
  1042.     move    P50_Volume(a5),P50_Shadow(a5)
  1043.     endc
  1044.     bra.b    P50_contfxdone
  1045.     endc
  1046.  
  1047.     ifne    P50_tpvs
  1048. P50_tpochvslide
  1049.     move.b    P50_Info(a5),d0
  1050.     sub.b    d0,P50_Volume+1(a5)
  1051.     bpl.b    .test
  1052.     clr    P50_Volume(a5)
  1053.     ifeq    fade
  1054.     clr    8(a4)
  1055.     else
  1056.     clr    P50_Shadow(a5)
  1057.     endc
  1058.     bra.b    P50_toneport
  1059. .test    moveq    #64,d0
  1060.     cmp    P50_Volume(a5),d0
  1061.     bge.b    .ncs
  1062.     move    d0,P50_Volume(a5)
  1063. .ncs    ifeq    fade
  1064.     move    P50_Volume(a5),8(a4)
  1065.     else
  1066.     move    P50_Volume(a5),P50_Shadow(a5)
  1067.     endc
  1068.     endc
  1069.  
  1070.     ifne    P50_tp
  1071. P50_toneport
  1072.     move    P50_ToPeriod(a5),d0
  1073.     beq.b    P50_contfxdone
  1074.     move    P50_TPSpeed(a5),d1
  1075.     cmp    P50_Period(a5),d0
  1076.     blt.b    .topoup
  1077.  
  1078.     add    d1,P50_Period(a5)
  1079.     cmp    P50_Period(a5),d0
  1080.     bgt.b    P50_toposetper
  1081.     move    d0,P50_Period(a5)
  1082.     clr    P50_ToPeriod(a5)
  1083.     move    d0,6(a4)
  1084.     bra.b    P50_contfxdone
  1085.  
  1086. .topoup
  1087.     sub    d1,P50_Period(a5)
  1088.     cmp    P50_Period(a5),d0
  1089.     blt.b    P50_toposetper
  1090.     move    d0,P50_Period(a5)
  1091.     clr    P50_ToPeriod(a5)
  1092. P50_toposetper
  1093.     move    P50_Period(a5),6(a4)
  1094.     else
  1095.     nop
  1096.     endc
  1097.  
  1098. P50_contfxdone
  1099.     add.l    d6,a5
  1100.     add.l    d7,a4
  1101.     dbf    d5,P50_lopas
  1102.  
  1103.     cmp    P50_speed2(pc),d4
  1104.     beq.b    P50_preplay
  1105.     rts
  1106.  
  1107.     ifne    P50_pu
  1108. P50_portup
  1109.     moveq    #0,D0
  1110.     move.b    P50_Info(a5),d0
  1111.     sub    d0,P50_Period(a5)
  1112.     moveq    #113,d0
  1113.     cmp    P50_Period(a5),d0
  1114.     ble.b    .skip
  1115.     move    d0,P50_Period(a5)
  1116.     move    d0,6(a4)
  1117.     bra.b    P50_contfxdone
  1118. .skip
  1119.     move    P50_Period(a5),6(a4)
  1120.     bra.b    P50_contfxdone
  1121.     endc
  1122.  
  1123.     ifne    P50_pd
  1124. P50_portdwn
  1125.     moveq    #0,d0
  1126.     move.b    P50_Info(a5),d0
  1127.     add    d0,P50_Period(a5)
  1128.     cmp    #856,P50_Period(a5)
  1129.     ble.b    .skip
  1130.     move    #856,d0
  1131.     move    d0,P50_Period(a5)
  1132.     move    d0,6(a4)
  1133.     bra.b    P50_contfxdone
  1134. .skip
  1135.     move    P50_Period(a5),6(a4)
  1136.     bra.b    P50_contfxdone
  1137.     endc
  1138.  
  1139. P50_preplay
  1140.     ifne    P50_pde
  1141.     tst    P50_pdelay(a3)
  1142.     beq.b    .djdj
  1143.     rts
  1144. .djdj
  1145.     endc
  1146.  
  1147.     lea    P50_temp0(pc),a5
  1148.     lea    P50_Samples-16(pc),a0
  1149.  
  1150.     moveq    #channels-1,d5
  1151. P50_loaps
  1152.     ifne    P50_pl
  1153.     move.l    (a5),P50_TData(a5)
  1154.     move.l    P50_ChaPos(a5),P50_TChaPos(a5)
  1155.     move.l    P50_TempPos(a5),P50_TTempPos(a5)
  1156.     move    P50_TempLen(a5),P50_TTempLen(a5)
  1157.     endc
  1158.  
  1159.     tst.b    P50_Pack(a5)
  1160.     beq.b    P50_takeone
  1161.     bmi.b    .keepsame
  1162.  
  1163.     subq.b    #1,P50_Pack(a5)
  1164.     clr    P50_OnOff(a5)
  1165.     add.l    d6,a5
  1166.     dbf    d5,P50_loaps
  1167.     rts
  1168.  
  1169. .keepsame
  1170.     addq.b    #1,P50_Pack(a5)
  1171.     bra.b    P50_dko
  1172.  
  1173. P50_takeone
  1174.     tst.b    P50_TempLen+1(a5)
  1175.     beq.b    P50_takenorm
  1176.  
  1177.     subq.b    #1,P50_TempLen+1(a5)
  1178.     move.l    P50_TempPos(a5),a2
  1179.  
  1180. P50_jedi
  1181.     move.l    (a5),P50_TData(a5)
  1182.     move.b    (a2)+,(a5)
  1183.     bpl.b    P50_normal
  1184.     not.b    (a5)+
  1185.     move.b    (a2)+,(a5)+
  1186.     move.b    (a2)+,(a5)+
  1187.     move.b    (a2)+,(a5)+
  1188.     subq.l    #4,a5
  1189.     move.l    a2,P50_TempPos(a5)
  1190.     bra.b    P50_dko
  1191.     
  1192. P50_normal
  1193.     move.b    (a2)+,1(a5)
  1194.     move.b    (a2)+,2(a5)
  1195.     move.l    a2,P50_TempPos(a5)
  1196.     bra.b    P50_dko
  1197.  
  1198. P50_takenorm
  1199.     move.l    P50_ChaPos(a5),a2
  1200.     move.b    (a2)+,(a5)
  1201.     bmi.b    P50_packed
  1202.     move.b    (a2)+,1(a5)
  1203.     move.b    (a2)+,2(a5)
  1204.     move.l    a2,P50_ChaPos(a5)
  1205.     bra.b    P50_dko
  1206.  
  1207. P50_kuiskus
  1208.     move.b    (a2)+,P50_TempLen+1(a5)
  1209.     moveq    #0,d0
  1210.     move.b    (a2)+,d0
  1211.     lsl    #8,d0
  1212.     move.b    (a2)+,d0
  1213.  
  1214.     move.l    a2,P50_ChaPos(a5)
  1215.     sub.l    d0,a2
  1216.     bra.b    P50_jedi
  1217.  
  1218. P50_packed
  1219.     cmp.b    #$80,(a5)
  1220.     beq.b    P50_kuiskus
  1221.     not.b    (a5)+
  1222.     move.b    (a2)+,(a5)+
  1223.     move.b    (a2)+,(a5)+
  1224.     move.b    (a2)+,(a5)+
  1225.     subq.l    #4,a5
  1226.     move.l    a2,P50_ChaPos(a5)
  1227.  
  1228. P50_dko    st    P50_OnOff(a5)
  1229.     move    (a5),d0
  1230.     and    #$1f0,d0
  1231.     beq.b    .koto
  1232.     lea    (a0,d0),a1
  1233.     move.l    a1,P50_Sample(a5)
  1234.     ifne    P50_ft
  1235.     move.l    P50_SampleVolume(a1),P50_Volume(a5)
  1236.     else
  1237.     move    P50_SampleVolume(a1),P50_Volume(a5)
  1238.     endc
  1239.  
  1240. .koto
  1241.     add.l    d6,a5
  1242.     dbf    d5,P50_loaps
  1243.     rts
  1244.  
  1245. P50_playtime
  1246.     clr    (a3)
  1247.     ifne    P50_pde
  1248.     tst    P50_pdelay(a3)
  1249.     beq.b    .djdj
  1250.     subq    #1,P50_pdelay(a3)
  1251.     bra    P50_delay
  1252. .djdj
  1253.     endc
  1254.  
  1255.     tst    P50_speedis1(a3)
  1256.     beq.b    .mo
  1257.     bsr    P50_preplay
  1258.  
  1259. .mo    lea    P50_temp0(pc),a5
  1260.     lea    $a0(a6),a4
  1261.  
  1262.     ifne    system
  1263.     moveq    #1,d4
  1264.     move    d4,P50_server(a3)
  1265.     move.l    P50_craddr+4(pc),a1
  1266.     move.b    #$4a,(a1)
  1267.     move.b    d4,$100(a1)
  1268.     else
  1269.     lea    P50_dmason(pc),a1
  1270.     move.l    P50_vektori(pc),a2
  1271.     move.l    a1,$78(a2)
  1272.  
  1273.     ifeq    CIA
  1274.     move.b    #$19,$bfde00
  1275.     else
  1276.     move.b    #$4a,$bfd400
  1277.     move.b    #1,$bfd500
  1278.     endc
  1279.     endc
  1280.  
  1281.     lea    P50_periods(pc),a2
  1282.  
  1283.     moveq    #0,d4
  1284.     moveq    #channels-1,d5
  1285. P50_los    tst    P50_OnOff(a5)
  1286.     beq    P50_nocha
  1287.  
  1288.     moveq    #$f,d0
  1289.     and    (a5),d0
  1290.     lea    P50_jtab(pc),a1
  1291.     add    d0,d0
  1292.     add.l    d0,a1
  1293.     add    (a1),a1
  1294.     jmp    (a1)
  1295.  
  1296. P50_fxdone
  1297.     moveq    #$7e,d0
  1298.     and.b    (a5),d0
  1299.     beq.b    P50_nocha
  1300.     ifne    P50_vib
  1301.     clr.b    P50_VibPos(a5)
  1302.     endc
  1303.  
  1304.      ifne    P50_ft
  1305.     add    P50_Fine(a5),d0
  1306.     endc
  1307.     move    d0,P50_Note(a5)
  1308.     move    (a2,d0),P50_Period(a5)
  1309.  
  1310. P50_zample
  1311.     or    P50_DMABit(a5),d4
  1312.     move    d4,$96(a6)
  1313.     move.l    P50_Sample(a5),a1
  1314.     move.l    (a1)+,(a4)
  1315.     move    (a1),4(a4)
  1316.  
  1317. P50_nocha
  1318.     ifeq    fade
  1319.     move.l    P50_Period(a5),6(a4)
  1320.     else
  1321.     move    P50_Period(a5),6(a4)
  1322.     move    P50_Volume(a5),P50_Shadow(a5)
  1323.     endc
  1324.  
  1325. P50_skip
  1326.     add.l    d6,a5
  1327.     add.l    d7,a4
  1328.     dbf    d5,P50_los
  1329.  
  1330.     move.b    d4,P50_dma+1(a3)
  1331.  
  1332.     ifne    P50_pl
  1333.     tst.b    P50_plflag+1(a3)
  1334.     beq.b    P50_ohittaa
  1335.  
  1336.     lea    P50_temp0(pc),a1
  1337.     lea    P50_looppos(pc),a0
  1338.     moveq    #channels-1,d0
  1339. .talt    move.b    3(a0),3(a1)
  1340.     addq.l    #4,a0
  1341.     move.l    (a0)+,P50_ChaPos(a1)
  1342.     move.l    (a0)+,P50_TempPos(a1)
  1343.     move    (a0)+,P50_TempLen(a1)
  1344.     add.l    d6,a1
  1345.     dbf    d0,.talt
  1346.  
  1347.     move    P50_plrowpos(pc),P50_rowpos(a3)
  1348.     clr.b    P50_plflag+1(a3)
  1349.     rts
  1350.     endc
  1351.  
  1352. P50_ohittaa
  1353.     subq    #1,P50_rowpos(a3)
  1354.     bmi.b    P50_nextpattern
  1355.     rts
  1356.  
  1357. P50_nextpattern
  1358.     ifne    P50_pl
  1359.     clr    P50_plflag(a3)
  1360.     endc
  1361.     move.l    P50_patternbase(pc),a4
  1362.     moveq    #63,d0
  1363.     move    d0,P50_rowpos(a3)
  1364.     move.l    P50_spos(a3),a1
  1365.     move.b    (a1)+,d0
  1366.     bpl.b    P50_dk
  1367.     move.l    P50_possibase(pc),a1
  1368.     move.b    (a1)+,d0
  1369. P50_dk    move.l    a1,P50_spos(a3)
  1370.     lsl    #2,d0
  1371.     move.l    P50_positionbase(pc),a1
  1372.     add.l    d0,a1
  1373.  
  1374.     move    (a1)+,d0
  1375.     lea    (a4,d0.l),a2
  1376.     move    (a1)+,d0
  1377.     move.l    a2,P50_ChaPos+P50_temp0(a3)
  1378.     lea    (a4,d0.l),a2
  1379.     move.l    a2,P50_ChaPos+P50_temp1(a3)
  1380.     move    (a1)+,d0
  1381.     lea    (a4,d0.l),a2
  1382.     move.l    a2,P50_ChaPos+P50_temp2(a3)
  1383.     move    (a1),d0
  1384.     add.l    d0,a4
  1385.     move.l    a4,P50_ChaPos+P50_temp3(a3)
  1386.     rts
  1387.  
  1388.     ifne    P50_tp
  1389. P50_settoneport
  1390.     move.b    P50_Info(a5),d0
  1391.     beq.b    P50_toponochange
  1392.     move.b    d0,P50_TPSpeed+1(a5)
  1393. P50_toponochange
  1394.     moveq    #$7e,d0
  1395.     and.b    (a5),d0
  1396.     beq    P50_nocha
  1397.     add    P50_Fine(a5),d0
  1398.     move    d0,P50_Note(a5)
  1399.     move    (a2,d0),P50_ToPeriod(a5)
  1400.     bra    P50_nocha
  1401.     endc
  1402.  
  1403.     ifne    P50_sof
  1404. P50_sampleoffse
  1405.     moveq    #$7e,d0
  1406.     and.b    (a5),d0
  1407.     beq    P50_nocha
  1408.     ifne    P50_vib
  1409.     clr.b    P50_VibPos(a5)
  1410.     endc
  1411.  
  1412.     ifne    P50_ft
  1413.     add    P50_Fine(a5),d0
  1414.     endc
  1415.     move    d0,P50_Note(a5)
  1416.     move    (a2,d0),P50_Period(a5)
  1417.  
  1418.     or    P50_DMABit(a5),d4
  1419.     move    d4,$96(a6)
  1420.     moveq    #0,d1
  1421.     move    #$ff00,d1
  1422.     and    2(a5),d1
  1423.     bne.b    P50_djidd
  1424.     move    P50_Offset(a5),d1
  1425. P50_djidd
  1426.     move    d1,P50_Offset(a5)
  1427.     move.l    P50_Sample(a5),a1
  1428.     move.l    (a1)+,d0
  1429.     add.l    d1,d0
  1430.     move.l    d0,(a4)
  1431.     lsr    #1,d1
  1432.     move    (a1),d0
  1433.     sub    d1,d0
  1434.     bpl.b    P50_offok
  1435.     move.l    -4(a1),(a4)
  1436.     moveq    #1,d0
  1437. P50_offok
  1438.     move    d0,4(a4)
  1439.     bra    P50_nocha
  1440.     endc
  1441.  
  1442.     ifne    P50_vl
  1443. P50_volum
  1444.     move.b    P50_Info(a5),P50_Volume+1(a5)
  1445.     bra    P50_fxdone
  1446.     endc
  1447.  
  1448.     ifne    P50_pj
  1449. P50_posjmp
  1450.     moveq    #0,d0
  1451.     move.b    P50_Info(a5),d0
  1452.     add.l    P50_possibase(pc),d0
  1453.     move.l    d0,P50_spos(a3)
  1454.     endc
  1455.  
  1456.     ifne    P50_pb
  1457. P50_pattbreak
  1458.     moveq    #64,d0
  1459.     move    d0,P50_rowpos(a3)
  1460.     move.l    P50_spos(pc),a1
  1461.     move.l    P50_patternbase(pc),a0
  1462.     move.b    (a1)+,d0
  1463.     bpl.b    P50_dk2
  1464.     move.l    P50_possibase(pc),a1
  1465.     move.b    (a1)+,d0
  1466. P50_dk2    move.l    a1,P50_spos(a3)
  1467.     move.l    P50_positionbase(pc),a1
  1468.     lsl    #2,d0
  1469.     add.l    d0,a1
  1470.     movem    (a1)+,d0-d3
  1471.     lea    (a0,d0.l),a1
  1472.     move    d1,d0
  1473.     move.l    a1,P50_ChaPos+P50_temp0(a3)
  1474.     lea    (a0,d0.l),a1
  1475.     move.l    a1,P50_ChaPos+P50_temp1(a3)
  1476.     move    d2,d0
  1477.     lea    (a0,d0.l),a1
  1478.     move.l    a1,P50_ChaPos+P50_temp2(a3)
  1479.     move    d3,d0
  1480.     add.l    d0,a0
  1481.     move.l    a0,P50_ChaPos+P50_temp3(a3)
  1482.     bra    P50_fxdone
  1483.     endc
  1484.  
  1485.     ifne    P50_vib
  1486. P50_vibrato
  1487.     move.b    P50_Info(a5),d0
  1488.     beq    P50_fxdone
  1489.     move.b    d0,d1
  1490.     move.b    P50_VibCmd(a5),d2
  1491.     and.b    #$f,d0
  1492.     beq.b    P50_vibskip
  1493.     and.b    #$f0,d2
  1494.     or.b    d0,d2
  1495. P50_vibskip
  1496.     and.b    #$f0,d1
  1497.     beq.b    P50_vibskip2
  1498.     and.b    #$f,d2
  1499.     or.b    d1,d2
  1500. P50_vibskip2
  1501.     move.b    d2,P50_VibCmd(a5)
  1502.     bra    P50_fxdone
  1503.     endc
  1504.  
  1505.     ifne    P50_tre
  1506. P50_settremo
  1507.     move.b    P50_Info(a5),d0
  1508.     beq    P50_fxdone
  1509.     move.b    d0,d1
  1510.     move.b    P50_TreCmd(a5),d2
  1511.     moveq    #$f,d3
  1512.     and.b    d3,d0
  1513.     beq.b    P50_treskip
  1514.     and.b    #$f0,d2
  1515.     or.b    d0,d2
  1516. P50_treskip
  1517.     and.b    #$f0,d1
  1518.     beq.b    P50_treskip2
  1519.     and.b    d3,d2
  1520.     or.b    d1,d2
  1521. P50_treskip2
  1522.     move.b    d2,P50_TreCmd(a5)
  1523.     bra    P50_fxdone
  1524.     endc
  1525.  
  1526.     ifne    P50_ec
  1527. P50_ecommands
  1528.     move.b    P50_Info(a5),d0
  1529.     and.b    #$f0,d0
  1530.     lsr    #3,d0
  1531.     move    P50_etab(pc,d0),d0
  1532.     jmp    P50_etab(pc,d0)
  1533.  
  1534. P50_etab
  1535.     ifne    P50_fi
  1536.     dc    P50_filter-P50_etab
  1537.     else
  1538.     dc    P50_fxdone-P50_etab
  1539.     endc
  1540.  
  1541.     ifne    P50_fsu
  1542.     dc    P50_fineup-P50_etab
  1543.     else
  1544.     dc    P50_fxdone-P50_etab
  1545.     endc
  1546.  
  1547.     ifne    P50_fsd
  1548.     dc    P50_finedwn-P50_etab
  1549.     else
  1550.     dc    P50_fxdone-P50_etab
  1551.     endc
  1552.  
  1553.     dc    P50_fxdone-P50_etab
  1554.     dc    P50_fxdone-P50_etab
  1555.  
  1556.     ifne    P50_sft
  1557.     dc    P50_setfinetune-P50_etab
  1558.     else
  1559.     dc    P50_fxdone-P50_etab
  1560.     endc
  1561.  
  1562.     ifne    P50_pl
  1563.     dc    P50_patternloop-P50_etab
  1564.     else
  1565.     dc    P50_fxdone-P50_etab
  1566.     endc
  1567.  
  1568.     dc    P50_fxdone-P50_etab
  1569.     dc    P50_fxdone-P50_etab
  1570.  
  1571.     ifne    P50_rt
  1572.     dc    P50_setretrig-P50_etab
  1573.     else
  1574.     dc    P50_fxdone-P50_etab
  1575.     endc
  1576.  
  1577.     ifne    P50_fvu
  1578.     dc    P50_finevup-P50_etab
  1579.     else
  1580.     dc    P50_fxdone-P50_etab
  1581.     endc
  1582.  
  1583.     ifne    P50_fvd
  1584.     dc    P50_finevdwn-P50_etab
  1585.     else
  1586.     dc    P50_fxdone-P50_etab
  1587.     endc
  1588.  
  1589.     dc    P50_fxdone-P50_etab
  1590.  
  1591.     ifne    P50_nd
  1592.     dc    P50_ndelay-P50_etab
  1593.     else
  1594.     dc    P50_fxdone-P50_etab
  1595.     endc
  1596.  
  1597.     ifne    P50_pde
  1598.     dc    P50_pattdelay-P50_etab
  1599.     else
  1600.     dc    P50_fxdone-P50_etab
  1601.     endc
  1602.     dc    P50_fxdone-P50_etab
  1603.     endc
  1604.  
  1605.     ifne    P50_fi
  1606. P50_filter
  1607.     move.b    P50_Info(a5),d0
  1608.     and.b    #$fd,$bfe001
  1609.     or.b    d0,$bfe001
  1610.     bra    P50_fxdone
  1611.     endc
  1612.  
  1613.     ifne    P50_fsu
  1614. P50_fineup
  1615.     P50_getnote
  1616.  
  1617.     moveq    #$f,d0
  1618.     and.b    P50_Info(a5),d0
  1619.     sub    d0,P50_Period(a5)
  1620.     moveq    #113,d0
  1621.     cmp    P50_Period(a5),d0
  1622.     ble    .jup
  1623.     move    d0,P50_Period(a5)
  1624. .jup    moveq    #$7e,d0
  1625.     and.b    (a5),d0
  1626.     bne    P50_zample
  1627.     bra    P50_nocha
  1628.     endc
  1629.  
  1630.     ifne    P50_fsd
  1631. P50_finedwn
  1632.     P50_getnote
  1633.  
  1634.     moveq    #$f,d0
  1635.     and.b    P50_Info(a5),d0
  1636.     add    d0,P50_Period(a5)
  1637.     cmp    #856,P50_Period(a5)
  1638.     ble    .jup
  1639.     move    #856,P50_Period(a5)
  1640. .jup    moveq    #$7e,d0
  1641.     and.b    (a5),d0
  1642.     bne    P50_zample
  1643.     bra    P50_nocha
  1644.     endc
  1645.  
  1646.     ifne    P50_sft
  1647. P50_setfinetune
  1648.     moveq    #$f,d0
  1649.     and.b    P50_Info(a5),d0
  1650.     add    d0,d0
  1651.     move    P50_mulutab(pc,d0),P50_Fine(a5)
  1652.     bra    P50_fxdone
  1653.  
  1654. P50_mulutab
  1655.     dc    0,74,148,222,296,370,444,518,592,666,740,814,888,962,1036,1110
  1656.     endc
  1657.  
  1658.     ifne    P50_pl
  1659. P50_patternloop
  1660.     moveq    #$f,d0
  1661.     and.b    P50_Info(a5),d0
  1662.     beq.b    P50_setloop
  1663.  
  1664.     tst.b    P50_plflag(a3)
  1665.     bne.b    P50_noset
  1666.  
  1667.     move    d0,P50_plcount(a3)
  1668.     st.b    P50_plflag(a3)
  1669. P50_noset
  1670.     tst    P50_plcount(a3)
  1671.     bne.b    P50_looppaa
  1672.     clr.b    P50_plflag(a3)
  1673.     bra    P50_fxdone
  1674.     
  1675. P50_looppaa
  1676.     st.b    P50_plflag+1(a3)
  1677.     subq    #1,P50_plcount(a3)
  1678.     bra    P50_fxdone
  1679.  
  1680. P50_setloop
  1681.     tst.b    P50_plflag(a3)
  1682.     bne    P50_fxdone
  1683.     move    P50_rowpos(pc),P50_plrowpos(a3)
  1684.     lea    P50_temp0(pc),a1
  1685.     lea    P50_looppos(pc),a0
  1686.     moveq    #channels-1,d0
  1687. .talt    move.l    P50_TData(a1),(a0)+
  1688.     move.l    P50_TChaPos(a1),(a0)+
  1689.     move.l    P50_TTempPos(a1),(a0)+
  1690.     move    P50_TTempLen(a1),(a0)+
  1691.     add.l    d6,a1
  1692.     dbf    d0,.talt
  1693.     bra    P50_fxdone
  1694.     endc
  1695.  
  1696.     ifne    P50_fvu
  1697. P50_finevup
  1698.     moveq    #$f,d0
  1699.     and.b    P50_Info(a5),d0
  1700.     add    d0,P50_Volume(a5)
  1701.     moveq    #64,d0
  1702.     cmp    P50_Volume(a5),d0
  1703.     bge    P50_fxdone
  1704.     move    d0,P50_Volume(a5)
  1705.     bra    P50_fxdone
  1706.     endc
  1707.  
  1708.     ifne    P50_fvd
  1709. P50_finevdwn
  1710.     moveq    #$f,d0
  1711.     and.b    P50_Info(a5),d0
  1712.     sub    d0,P50_Volume(a5)
  1713.     bpl    P50_fxdone
  1714.     clr    P50_Volume(a5)
  1715.     bra    P50_fxdone
  1716.     endc
  1717.  
  1718.     ifne    P50_rt
  1719. P50_setretrig
  1720.     moveq    #$f,d0
  1721.     and.b    P50_Info(a5),d0
  1722.     move    d0,P50_RetrigCount(a5)
  1723.     bra    P50_fxdone
  1724.     endc
  1725.  
  1726.     ifne    P50_nd
  1727. P50_ndelay
  1728.     moveq    #$7e,d0
  1729.     and.b    (a5),d0
  1730.     beq    P50_skip
  1731.     ifne    P50_vib
  1732.     clr.b    P50_VibPos(a5)
  1733.     endc
  1734.     ifne    P50_ft
  1735.     add    P50_Fine(a5),d0
  1736.     endc
  1737.     move    d0,P50_Note(a5)
  1738.     move    (a2,d0),P50_Period(a5)
  1739.     ifeq    fade
  1740.     move    P50_Volume(a5),8(a4)
  1741.     else
  1742.     move    P50_Volume(a5),P50_Shadow(a5)
  1743.     endc
  1744.     bra    P50_skip
  1745.     endc
  1746.  
  1747.     ifne    P50_pde
  1748. P50_pattdelay
  1749.     moveq    #$f,d0
  1750.     and.b    P50_Info(a5),d0
  1751.     move    d0,P50_pdelay(a3)
  1752.     bra    P50_fxdone
  1753.     endc
  1754.  
  1755.     ifne    P50_sd
  1756. P50_cspeed
  1757.     move.b    P50_Info(a5),d0
  1758.  
  1759.     ifne    CIA
  1760.     tst    P50_Tempo(a3)
  1761.     beq.b    P50_VBlank
  1762.     cmp.b    #32,d0
  1763.     bhs.b    P50_STempo
  1764.     endc
  1765.  
  1766. P50_VBlank
  1767.     cmp.b    #1,d0
  1768.     bne.b    P50_jkd
  1769.  
  1770.     move.b    d0,P50_speed+1(a3)
  1771.     move.b    d0,P50_speed2+1(a3)
  1772.     st    P50_speedis1(a3)
  1773.     bra    P50_fxdone
  1774. P50_jkd    move.b    d0,P50_speed+1(a3)
  1775.     subq.b    #1,d0
  1776.     move.b    d0,P50_speed2+1(a3)
  1777.     clr    P50_speedis1(a3)
  1778.     bra    P50_fxdone
  1779.  
  1780.     ifne    CIA
  1781. P50_STempo
  1782.     move.l    P50_timer(pc),d1
  1783.     divu    d0,d1
  1784.     move    d1,P50_thi2(a3)
  1785.     sub    #$1c8*2,d1
  1786.     move    d1,P50_thi(a3)
  1787.     bra    P50_fxdone
  1788.     endc
  1789.     endc
  1790.  
  1791.     ifne    P50_vbvs
  1792. P50_vibochvslide
  1793.     move.b    P50_Info(a5),d0
  1794.     sub.b    d0,P50_Volume+1(a5)
  1795.     bpl.b    P50_test62
  1796.     clr    P50_Volume(a5)
  1797.     ifeq    fade
  1798.     clr    8(a4)
  1799.     else
  1800.     clr    P50_Shadow(a5)
  1801.     endc
  1802.     bra.b    P50_vib2
  1803. P50_test62    moveq    #64,d0
  1804.     cmp    P50_Volume(a5),d0
  1805.     bge.b    .ncs2
  1806.     move    d0,P50_Volume(a5)
  1807. .ncs2
  1808.     ifeq    fade
  1809.     move    P50_Volume(a5),8(a4)
  1810.     else
  1811.     move    P50_Volume(a5),P50_Shadow(a5)
  1812.     endc
  1813.     endc
  1814.  
  1815.     ifne    P50_vib
  1816. P50_vib2
  1817.     move    #$f00,d0
  1818.     move    P50_VibCmd(a5),d1
  1819.     and    d1,d0
  1820.     lsr    #2,d0
  1821.     
  1822.     lsr    #1,d1
  1823.     and    #$3e,d1
  1824.     add    d1,d0
  1825.  
  1826.     move    P50_Period(a5),d1
  1827.     tst.b    P50_VibPos(a5)
  1828.     bmi.b    .vibneg
  1829.     add    P50_vibtab(pc,d0),d1
  1830.     bra.b    P50_vib4
  1831.  
  1832. .vibneg    sub    P50_vibtab(pc,d0),d1
  1833.  
  1834. P50_vib4
  1835.     move    d1,6(a4)
  1836.     move.b    P50_VibCmd(a5),d0
  1837.     lsr.b    #2,d0
  1838.     and    #$3c,d0
  1839.     add.b    d0,P50_VibPos(a5)
  1840.     bra    P50_contfxdone
  1841.     endc
  1842.  
  1843.     ifne    P50_tre
  1844. P50_tremo
  1845.     move    #$f00,d0
  1846.     move    P50_TreCmd(a5),d1
  1847.     and    d1,d0
  1848.     lsr    #2,d0
  1849.     
  1850.     lsr    #1,d1
  1851.     and    #$3e,d1
  1852.     add    d1,d0
  1853.  
  1854.     move    P50_Volume(a5),d1
  1855.     tst.b    P50_TrePos(a5)
  1856.     bmi.b    .treneg
  1857.     add    P50_vibtab(pc,d0),d1
  1858.     cmp    #64,d1
  1859.     ble.b    P50_tre4
  1860.     moveq    #64,d1
  1861.     bra.b    P50_tre4
  1862.  
  1863. .treneg    sub    P50_vibtab(pc,d0),d1
  1864.     bpl.b    P50_tre4
  1865.     moveq    #0,d1
  1866. P50_tre4
  1867.     ifeq    fade
  1868.     move    d1,8(a4)
  1869.     else
  1870.     move    d1,P50_Shadow(a5)
  1871.     endc
  1872.  
  1873.     move.b    P50_TreCmd(a5),d0
  1874.     lsr.b    #2,d0
  1875.     and    #$3c,d0
  1876.     add.b    d0,P50_TrePos(a5)
  1877.     bra    P50_contfxdone
  1878.     endc
  1879.  
  1880.     ifne    P50_vib!P50_tre
  1881. P50_vibtab    incbin    vibtab
  1882.     endc
  1883.  
  1884. P50_jtab
  1885.     dr    P50_fxdone
  1886.     dr    P50_fxdone
  1887.     dr    P50_fxdone
  1888.  
  1889.     ifne    P50_tp
  1890.     dr    P50_settoneport
  1891.     else
  1892.     dr    P50_fxdone
  1893.     endc
  1894.  
  1895.     ifne    P50_vib
  1896.     dr    P50_vibrato
  1897.     else
  1898.     dr    P50_fxdone
  1899.     endc
  1900.  
  1901.     ifne    P50_tpvs
  1902.     dr    P50_toponochange
  1903.     else
  1904.     dr    P50_fxdone
  1905.     endc
  1906.  
  1907.     dr    P50_fxdone
  1908.  
  1909.     ifne    P50_tre
  1910.     dr    P50_settremo
  1911.     else
  1912.     dr    P50_fxdone
  1913.     endc
  1914.  
  1915.     dr    P50_fxdone
  1916.  
  1917.     ifne    P50_sof
  1918.     dr    P50_sampleoffse
  1919.     else
  1920.     dr    P50_fxdone
  1921.     endc
  1922.     dr    P50_fxdone
  1923.  
  1924.     ifne    P50_pj
  1925.     dr    P50_posjmp
  1926.     else
  1927.     dr    P50_fxdone
  1928.     endc
  1929.  
  1930.     ifne    P50_vl
  1931.     dr    P50_volum
  1932.     else
  1933.     dr    P50_fxdone
  1934.     endc
  1935.  
  1936.     ifne    P50_pb
  1937.     dr    P50_pattbreak
  1938.     else
  1939.     dr    P50_fxdone
  1940.     endc
  1941.  
  1942.     ifne    P50_ec
  1943.     dr    P50_ecommands
  1944.     else
  1945.     dr    P50_fxdone
  1946.     endc
  1947.     
  1948.     ifne    P50_sd
  1949.     dr    P50_cspeed
  1950.     else
  1951.     dr    P50_fxdone
  1952.     endc
  1953.  
  1954. P50_dmason
  1955.     ifeq    system
  1956.     tst.b    $bfdd00
  1957.     move.l    a0,-(sp)
  1958.     move.l    P50_vektori(pc),a0
  1959.     move.l    P50_intaddr(pc),$78(a0)
  1960.     move.l    (sp)+,a0
  1961.     move    P50_dma(pc),$dff096
  1962.     move    #$2000,$dff09c
  1963.     move.b    #$19,$bfde00
  1964.     rte
  1965.  
  1966.     else
  1967.     move    P50_dma(pc),$96(a6)
  1968.     addq    #1,P50_server(a3)
  1969.     move.l    P50_craddr(pc),a0
  1970.     move.b    #$19,(a0)
  1971.     bra    P50_ohi
  1972.     endc
  1973.  
  1974.  
  1975. P50_setrepeat
  1976.     ifeq    system
  1977.     tst.b    $bfdd00
  1978.     movem.l    a0/a1,-(sp)
  1979.     lea    $dff0a0,a1
  1980.     else
  1981.     lea    $a0(a6),a1
  1982.     endc
  1983.  
  1984.     move.l    P50_Sample+P50_temp0(pc),a0
  1985.     addq.l    #6,a0
  1986.     move.l    (a0)+,(a1)+
  1987.     move    (a0),(a1)
  1988.  
  1989.     ifgt    channels-1
  1990.     move.l    P50_Sample+P50_temp1(pc),a0
  1991.     addq.l    #6,a0
  1992.     move.l    (a0)+,12(a1)
  1993.     move    (a0),16(a1)
  1994.     endc
  1995.     
  1996.     ifgt    channels-2
  1997.     move.l    P50_Sample+P50_temp2(pc),a0
  1998.     addq.l    #6,a0
  1999.     move.l    (a0)+,28(a1)
  2000.     move    (a0),32(a1)
  2001.     endc
  2002.  
  2003.     ifgt    channels-3
  2004.     move.l    P50_Sample+P50_temp3(pc),a0
  2005.     addq.l    #6,a0
  2006.     move.l    (a0)+,44(a1)
  2007.     move    (a0),48(a1)
  2008.     endc
  2009.  
  2010.     ifne    system
  2011.     clr    P50_server(a3)
  2012.     move.l    P50_craddr+4(pc),a0
  2013.     move.b    P50_tlo(pc),(a0)
  2014.     move.b    P50_thi(pc),$100(a0)
  2015.     bra    P50_ohi
  2016.     else
  2017.  
  2018.     move    #$2000,-8(a1)
  2019.     move.l    P50_vektori(pc),a0
  2020.  
  2021.     ifeq    CIA
  2022.     move.l    P50_oldlev6(pc),$78(a0)
  2023.     else
  2024.     move.l    P50_tintti(pc),$78(a0)
  2025.     move.b    P50_tlo(pc),$bfd400
  2026.     move.b    P50_thi(pc),$bfd500
  2027.     endc
  2028.  
  2029.     movem.l    (sp)+,a0/a1
  2030.     rte
  2031.     endc
  2032.  
  2033. P50_temp0
  2034.     dcb.b    Channel_Block_SIZE-2
  2035.     dc    1
  2036. P50_temp1
  2037.     dcb.b    Channel_Block_SIZE-2
  2038.     dc    2
  2039. P50_temp2
  2040.     dcb.b    Channel_Block_SIZE-2
  2041.     dc    4
  2042. P50_temp3
  2043.     dcb.b    Channel_Block_SIZE-2
  2044.     dc    8
  2045.  
  2046. P50_cn    dc    0
  2047. P50_dma    dc    $8200
  2048. P50_rowpos
  2049.     dc    63
  2050. P50_speed
  2051.     dc    6
  2052. P50_speed2
  2053.     dc    5
  2054. P50_speedis1
  2055.     dc    0
  2056. P50_spos
  2057.     dc.l    0
  2058. P50_vektori
  2059.     dc.l    0
  2060.  
  2061.     ifne    CIA
  2062. P50_tintti
  2063.     dc.l    0
  2064. P50_thi    dc.b    0
  2065. P50_tlo    dc.b    0
  2066. P50_thi2
  2067.     dc.b    0
  2068. P50_tlo2
  2069.     dc.b    0
  2070. P50_timer
  2071.     dc.l    0
  2072.     endc
  2073.  
  2074.     ifne    P50_pl
  2075. P50_plcount
  2076.     dc    0
  2077. P50_plflag
  2078.     dc    0
  2079. P50_plreset
  2080.     dc    0
  2081. P50_plrowpos
  2082.     dc    0
  2083. P50_looppos
  2084.     dcb.b    14*channels
  2085.     endc
  2086.  
  2087.     ifne    P50_pde
  2088. P50_pdelay
  2089.     dc    0
  2090.     endc
  2091. P50_Samples
  2092.     dcb.b    16*31
  2093. P50_positionbase
  2094.     dc.l    0
  2095. P50_possibase
  2096.     dc.l    0
  2097. P50_patternbase
  2098.     dc.l    0
  2099. P50_intaddr
  2100.     dc.l    0
  2101. P50_oldlev6
  2102.     dc.l    0
  2103.     ifne    system
  2104. P50_server
  2105.     dc    0
  2106. P50_miscbase    dc.l    0
  2107. P50_audioopen    dc.b    0
  2108. P50_sigbit    dc.b    -1
  2109. P50_ciares    dc.l    0
  2110. P50_craddr    dc.l    0,0,0
  2111.  
  2112. P50_dat        dc    $f00
  2113. P50_timerinterrupt
  2114.         dc    0,0,0,0,127
  2115. P50_timerdata    dc.l    0,0,0
  2116.  
  2117. P50_allocport    dc.l    0,0
  2118.         dc.b    4,0
  2119.         dc.l    0
  2120.         dc.b    0,0
  2121.         dc.l    0
  2122. P50_reqlist    dc.l    0,0,0
  2123.         dc.b    5,0
  2124. P50_allocreq    dc.l    0,0
  2125.         dc    127
  2126.         dc.l    0
  2127. P50_portti    dc.l    0
  2128.         dc    68
  2129.         dc.l    0,0,0
  2130.         dc    0
  2131. P50_reqdata    dc.l    0
  2132.         dc.l    1,0,0,0,0,0,0
  2133.         dc    0
  2134. P50_audiodev    dc.b    'audio.device',0
  2135.  
  2136. P50_cianame    dc.b    'ciax.resource',0
  2137. P50_timeropen    dc.b    0
  2138. P50_timerint    dc.b    'P50TimerInterrupt',0
  2139.     endc
  2140. P50_etu
  2141.     endb    a3
  2142.  
  2143. ******** END OF BINARY FILE **************
  2144.  
  2145.     section    chip,data_c
  2146. P50_data    incbin    "modules/P50..huuliherpes."
  2147. P50_dend
  2148. ;    section    smp,data_c
  2149. ;samples    incbin    "ram:SMP.let there be funk2"
  2150.